package cn.kepu.elearning.controller;

import cn.kepu.elearning.common.JsonResult;
import cn.kepu.elearning.service.SyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 同步数据到es
 *
 * @author Endy
 * @create 2019-12-06 下午3:46
 **/
@RestController
@RequestMapping("/sync")
public class SyncController {

    @Autowired
    private SyncService syncService;

    @GetMapping("/sync")
    public JsonResult sync() {
        return syncService.sync();
    }
}
